Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build libcxxabi and libcxx with threads enabled #301

Merged
merged 1 commit into from
Mar 16, 2023

Conversation

whitequark
Copy link
Contributor

@whitequark whitequark commented Feb 23, 2023

@whitequark
Copy link
Contributor Author

I've built YoWASP nextpnr with parallel refinement enabled and I can report that the improvements running on wasmtime are very similar to those seen with a native build.

@abrown
Copy link
Collaborator

abrown commented Feb 24, 2023

@whitequark, thanks for this PR! I am fine with this but I feel like @sunfishcode should take a look: do we want to merge this in main? I think it makes sense to do so, but it is related to the decision on whether the wasi-sdk-20 — the real release, not my pre-release — contains all of the wasm32-wasi-threads target stuff. I would assume yes, but wanted to leave it up to you. (Once this is merged, I could patch it into #296 and rebuild the wasi-sdk-20+threads pre-release with this to try things out).

@sunfishcode
Copy link
Member

Looks good to me!

@sunfishcode sunfishcode merged commit d21c040 into WebAssembly:main Mar 16, 2023
@whitequark whitequark deleted the threads-libcxxabi-libcxx branch March 16, 2023 22:41
sternenseemann added a commit to sternenseemann/nixpkgs that referenced this pull request Jul 5, 2023
pkgsCross.wasi32.llvmPackages: 12 -> 16

* It appears BULK_MEMORY_SOURCES no longer needs to be set to be empty
  to compile firefox. Without it, the build of wasilibc would fail if
  enableThreads is true.

* Include preliminary support for the experimental threads support in
  wasilibc which provides pthreads API. If wasilibc is built with
  support, is exposed via passthru and libcxx / libcxxabi are built with
  threads support accordingly.

  See also:
  - WebAssembly/wasi-sdk#274
  - WebAssembly/wasi-sdk#301
  - WebAssembly/wasi-sdk#314

  wasi-sdk ships it by default, but as a separate variant of libc which
  would be a hassle for us. Let's just make it optional for now.

  You can try it out using the following overlay:

      self: super: {
        wasilibc = super.wasilibc.override { enableThreads = true; };
      }

  Flags for libc++abi are copied from wasi-sdk.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants